package com.example.administrator.rxjavarxandroid_retrofit.http.exception;

import android.support.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * Created by Administrator on 2016/12/14.
 */
public class CodeException {


    /*网络错误*/
    public static final int NETWORD_ERROR = 0x1;
    /*http_错误*/
    public static final int HTTP_ERROR = 0x2;
    /*fastjson错误*/
    public static final int JSON_ERROR = 0x3;
    /*未知错误*/
    public static final int UNKNOWN_ERROR = 0x4;
    /*运行时异常-包含自定义异常*/
    public static final int RUNTIME_ERROR = 0x5;
    /*无法解析该域名*/
    public static final int UNKOWNHOST_ERROR = 0x6;
    //登录凭证过期
    public static final int UNKOWNHOST_AVALIDATE = 401;
    //无权限
    public static final int UNKOWNHOST_NO_PERMISSION = 403;
    //contenttype异常
    public static final int UNKOWNHOST_CONTENTTYPE_ERROR = 415;


    @IntDef({NETWORD_ERROR, HTTP_ERROR, RUNTIME_ERROR, UNKNOWN_ERROR, JSON_ERROR, UNKOWNHOST_ERROR,UNKOWNHOST_AVALIDATE,UNKOWNHOST_NO_PERMISSION,UNKOWNHOST_CONTENTTYPE_ERROR})
    @Retention(RetentionPolicy.SOURCE)
    public @interface CodeEp {
    }

}
